<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>jquery.tabs</title>
<link rel="stylesheet" type="text/css" href="../themes/default/tabs.css" />
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
<script type="text/javascript" src="../jquery-1.10.2.js">
</script>
<script type="text/javascript" src="../src/jquery.parser.js">
</script>
<script type="text/javascript" src="../src/jquery.tabs.js">
</script>
<style>
	html, body {
		 
	}
</style>
</head>
<body>
  
<div id="tt" class="xui-tabs" data-options="">
	<div title="标题1" data-options="closable:true" style="padding:10px;">
		<p style="margin:0;">
			1111111111
		</p>
	</div>
	<div title="标题2" data-options="closable:true" style="padding:10px;">
		<p style="margin:0;">
			2222222222
		</p>
	</div>
</div>

<button onclick="addTab()">新增</button>

<script>
	$(function() {
		$('.tabs, .xui-tabs').tabs();
		
		console.log($('#tt').tabs('getTab', '标题2'));
	});
	
	function addTab() {
		$('#tt').tabs('add', {
			title: '123',
			content:'Tab Body',
    		closable:true,
		});
	}
</script>
</body>
</html>
